home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / objc / NXStringTable.h < prev    next >
Text File  |  1991-10-09  |  1KB  |  48 lines

  1. /*
  2.     NXStringTable.h
  3.     Copyright 1990 NeXT, Inc.
  4.     
  5.     DEFINED AS: A common class
  6.     HEADER FILES: objc/NXStringTable.h
  7.  
  8. */
  9.  
  10. #ifndef _OBJC_NXSTRINGTABLE_H_
  11. #define _OBJC_NXSTRINGTABLE_H_
  12.  
  13. #import <objc/HashTable.h>
  14.  
  15. #define MAX_NXSTRINGTABLE_LENGTH    1024
  16.  
  17. @interface NXStringTable: HashTable
  18.  
  19. - init;
  20. - free;
  21.     
  22. - (const char *)valueForStringKey:(const char *)aString;
  23.     
  24. - readFromStream:(NXStream *)stream;
  25. - readFromFile:(const char *)fileName;
  26.  
  27. - writeToStream:(NXStream *)stream;
  28. - writeToFile:(const char *)fileName;
  29.  
  30. /*
  31.  * The following new... methods are now obsolete.  They remain in this 
  32.  * interface file for backward compatibility only.  Use Object's alloc method 
  33.  * and the init method defined in this class to create an NXStringTable and
  34.  * the readFrom... methods to fill it with data.
  35.  */
  36.  
  37. + new;
  38. + newFromStream:(NXStream *)stream;
  39. + newFromFile:(const char *)fileName;
  40.  
  41. @end
  42.  
  43. static inline const char *NXSTR(NXStringTable *table, const char *key) {
  44.     return [table valueForStringKey:key];
  45. }
  46.  
  47. #endif /* _OBJC_NXSTRINGTABLE_H_ */
  48.